<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script type="text/javascript">
    (function() {
        loadPrint();

    }());

    function loadPrint() {
        window.print();
        console.log("dddddd");
    }
</script>
<body>

</body>
</html>
